package com.xhs.common.bean;

import com.xhs.common.util.json.XhsGsonBuilder;
import lombok.Data;

import java.io.Serializable;

/**
 * access token.
 */
@Data
public class XhsAccessToken implements Serializable {
  private static final long serialVersionUID = 8709719312922168909L;

  private String accessToken;

  private int expireIn = -1;

  public static XhsAccessToken fromJson(String json) {
    return XhsGsonBuilder.create().fromJson(json, XhsAccessToken.class);
  }

}
